package com.immediatus.graphics.font;

public class Character{
    private final int _advance;
    private final int _width;
    private final int _height;
    private final float _textureX;
    private final float _textureY;
    private final float _textureWidth;
    private final float _textureHeight;
    private final char _value;

    Character(final char ch_, final int advance_, final int w_, final int h_, final float tx_, final float ty_, final float tw_, final float th_){
        this._value = ch_;
        this._advance = advance_;
        this._width = w_;
        this._height = h_;
        this._textureX = tx_;
        this._textureY = ty_;
        this._textureWidth = tw_;
        this._textureHeight = th_;
    }

    public int getAdvance(){
        return _advance;
    }

    public int getWidth(){
        return _width;
    }

    public int getHeight(){
        return _height;
    }

    public float getTextureWidth(){
        return _textureWidth;
    }

    public float getTextureHeight(){
        return _textureHeight;
    }

    public char getValue(){
        return _value;
    }

    public float getTextureX(){
        return _textureX;
    }

    public float getTextureY(){
        return _textureY;
    }

    @Override
    public int hashCode(){
        final int prime = 31;
        int result = 1;
        result = prime * result + this._value;
        return result;
    }

    @Override
    public boolean equals(final Object obj_){
        if (this == obj_){
            return true;
        }
        if (obj_ == null){
            return false;
        }
        if (this.getClass() != obj_.getClass()){
            return false;
        }
        final Character other = (Character) obj_;
        return this._value == other._value;
    }
}